<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of Lib_Util
 *
 * @author Zelic
 */
class Lib_Util {
    static function upperCaseWord($word){
        return strtoupper(substr($word, 0, 1)) . substr($word, 1, strlen($word) - 1);
    }
    
    static function subStringByWord($string, $num){
        $part = explode(' ', $string);
        if (count($part)<$num){
            return $string;
        } else {
            $part = array_slice($part, 0, $num);
            return join(' ', $part);
        }
    }
}

?>
